package com.tbgov.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 家庭信息
 * </p>
 *
 * @author 1st
 * @since 2024-11-19
 */
@Getter
@Setter
@Schema(name = "Family", description = "家庭信息")
public class Family implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "家庭主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @Schema(description = "户号")
    private String serialNo;
    @Schema(description = "脱贫情况 0:脱贫户 1:一般户 2:贫困户 默认:0")
    private Byte isPoverty;
    @Schema(description = "选择脱贫户时显示是否纳入监测户字段 0:否 1:是 默认0")
    private Byte isMonitor;
    @Schema(description = "家庭地址")
    private String address;

    @Schema(description = "家庭成员集合 注意：新增家庭时，家庭成员中需要包含户主信息，不存在时需要限制提交")
    @TableField(exist = false)
    private List<FamilyMember> members;
}
